package com.xc.smart.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xc.smart.entity.Role;
import com.xc.smart.mapper.RoleMapper;
import com.xc.smart.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Set;

/**
 * @author mtl
 * 2021/6/15
 */
@Service
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements RoleService  {

    @Autowired
    RoleMapper roleMapper;

    @Override
    public Set<String> selectUserRoleByUser(Integer userId) {
        Set<String> strings = roleMapper.selectByName(userId);
        return strings;
    }
}
